package com.hr.reactive.mono;

import com.hr.reactive.common.Utils;
import com.hr.reactive.mono.s02.LazyStream01;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Lec11BlockingIo {
    private static final Logger log = LoggerFactory.getLogger(Lec11BlockingIo.class);

    public static void main(String[] args) {

        ExternalServiceClient externalServiceClient=new ExternalServiceClient();
        for (int i = 0; i < 50; i++) {
           // externalServiceClient.getData().subscribe(Utils.subscriber());
            //block阻塞  的
            String block = externalServiceClient.getData().block();
            log.warn(block);
        }
        Utils.sleepSeconds(3000);
    }
}
